<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterShopsAddBranchLngLat extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('shops', function (Blueprint $table) {
            $table->string('lng', 36)->default('')->comment('经度')->after('district');
            $table->string('lat', 36)->default('')->comment('纬度')->after('lng');
            $table->string('branch', 120)->default('')->comment('所属分公司')->after('lat');
            $table->string('privateDrainageImg', 120)->default('')->comment('私域引流图片')->after('branch');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('shops', function (Blueprint $table) {
            $table->dropColumn('lng');
            $table->dropColumn('lat');
            $table->dropColumn('branch');
            $table->dropColumn('privateDrainageImg');
        });
    }
}
